/*
 *
Desk(int, int, int, int)
Desk(void)
Desk(parm &)

 *
 */

#include <iostream>
using namespace std;
struct param{
	int l;
	int w;
	int h;
	int ww;
};
class Desk{
	private:
		int length, width, height, weight;
	public:
		Desk(int l, int w, int h, int ww);
#if 1
		Desk(void){
			cout << "Desk(void)" << endl;
			length = 0;
			width = 0;
			height = 0;
			weight = 0;
		}
#endif
		Desk(param & p){
			cout << "Desk(parm &)" << endl;
			length = p.l;
			width = p.w;
			height = p.h;
			weight = p.ww;
		}
};
#if 1
Desk::Desk(int l, int w, int h, int ww){
	cout << "Desk(int, int, int, int)" << endl;
	length = l;
	width = w;
	height = h;
	weight = ww;
}
#endif
int main(void){
	Desk d1(1,2,3,4);

	Desk d2;  //调用无参构造函数
	
	param pm;
	pm.l = 1;
	pm.w = 2;
	pm.h = 3;
	pm.ww =4;
	Desk d3(pm);
	return 0;
}
